<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>  
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%-- <jsp:include page="../common/lib.jsp"></jsp:include>
    <link rel="stylesheet" href="<%=basePath%>resources/common/css/dataTables.tableTools.css"type="text/css">
  <SCRIPT language=javascript src="<%=basePath%>resources/common/js/jquery.dataTables.min.js"></SCRIPT>
      <script src="<%=basePath%>resources/purchase/js/purchase.js" type="text/javascript"></script> --%>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/common/js/jquery.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/resources/common/js/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/resources/common/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/resources/common/js/jquery.ztree.all.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/resources/common/js/bootstrapValidator.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/resources/common/js/common.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/resources/message/js/purchase.js"></script>
<%-- 	<script type="text/javascript" src="<%=request.getContextPath()%>/resources/wineproduct/js/wineproduct_bootstrapValidator.js"></script> --%> 
 	<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/common/css/bootstrap.min.css"/> 
	<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/common/css/jquery.dataTables.min.css"/> 
	<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/common/css/bootstrapValidator.min.css"/> 
	<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/common/css/zTreeStyle.css"/>

</head>
<body>
       <div class="container-fluid">
				<div class="info-center"> 
					<div class="page-header">
                      <div class="pull-left">
						<h4>消息中心</h4>      
						</div>
                     </div>
                     
                    <div class="page-header"> 
                     
                     
                   
                <!--  <input type="button" class="btn btn-danger btn-sm" value="批量删除" onclick="deleteFranchisee()"> -->
                 <shiro:hasPermission name="purchase:add">
                 	<input type="button" class="btn btn-primary btn-sm addBtn" value="添加" onclick="purchaseadd()">
                 </shiro:hasPermission>   
           <%--           <shiro:hasPermission name="purchase:detailButton"> 
                     <button class="btn btn-primary" onclick="purchase_detail(this)" >订单详情</button> 
                     
                     </shiro:hasPermission> --%>
                    
					<!-- <div class="table-margin"> -->
                      <table class="table table-bordered table-header" id="example">
                    <thead>
		<tr>
		<th><input type="checkbox" name="allChecked" /></th>
	  	<th>id</th>
	  	<th>名称</th>
	  	<th>结束时间</th>
	  	<th>开始时间 </th>
	  	<th>描述</th>
	  	<th>状态</th>
	  	<th>操作</th>
	  </tr>
	  </thead>
                         <tbody>
                        
                         </tbody>
                      </table>
                <!--     </div>
				</div>
				<div class="show-page hidden">
					<ul>
					</ul>
				</div> -->
				
			
				
 				<!--新增页面开始  -->
<div class="modal fade" id="myModal-add-infoq" tabindex="-1" role="dialog"
                 aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close"
                                    data-dismiss="modal" aria-hidden="true">
                                &times;
                            </button>
                            <h4 class="modal-title" id="myModalLabel">
                                新 增
                            </h4>
                        </div>
                            <div class="modal-body">
                        <form class="form-horizontal" role="form" action="" method="post"  id="category_add">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >名称： </label>
										<input type="hidden" id="ycid">
                                    <div class="col-sm-9">
                                        <input type="text"  class="form-control" id="nameid"  name="name" style="width: 250px" maxlength="15" placeholder="10个汉字以内" />

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >结束时间： </label>

                                    <div class="col-sm-9">
                                        <input type="text"   class=" sortNumber form-control"  name="endtime" id="endtimeid" style="width: 250px" maxlength="3"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >开始时间： </label>

                                    <div class="col-sm-9">
                                        <input type="text"   class=" sortNumber form-control"  name="starttime" id="starttimeid" style="width: 250px" maxlength="3"/>
                                    </div>
                                </div>
                                      <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >描述： </label>

                                    <div class="col-sm-9">
                                        <input type="text"   class=" sortNumber form-control"  name="detail" id="detailid" style="width: 250px" maxlength="3"/>
                                    </div>
                                </div>
                                      <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >状态： </label>

                                    <div class="col-sm-9">
                                        <input type="text"   class=" sortNumber form-control"  name="state" id="stateid" style="width: 250px" maxlength="3"/>
                                    </div>
                               
                                
                           
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default"
                                        data-dismiss="modal">关闭
                                </button>
                                <button type="button" class="btn btn-primary" onclick="purchaseaddtj()">提交
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
       </div>     
            
            
            
            
             
            <div class="modal fade" id="myModal-update-info" tabindex="-1" role="dialog"
                 aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close"
                                    data-dismiss="modal" aria-hidden="true">
                                &times;
                            </button>
                            <h4 class="modal-title" id="myModalLabel">
                               修改
                            </h4>
                        </div>
                        <form class="form-horizontal" role="form" action="" method="post"  id="category_update">
                            <div class="modal-body">
                                <div class="form-group">
                                	<input type="hidden" id="updateid1" name="id">
                                    <label class="col-sm-3 control-label no-padding-right" >名称： </label>
										
                                    <div class="col-sm-9">
                                        <input type="text"  class="form-control" id="nameid1"  name="name" style="width: 250px" maxlength="15" placeholder="10个汉字以内" />

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >结束时间： </label>

                                    <div class="col-sm-9">
                                        <input type="text"   class=" sortNumber form-control"  name="endtime" id="endtimeid1" style="width: 250px" maxlength="3"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >开始时间： </label>

                                    <div class="col-sm-9">
                                        <input type="text"   class=" sortNumber form-control"  name="starttime" id="starttimeid1" style="width: 250px" maxlength="3"/>
                                    </div>
                                </div>
                                      <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >描述： </label>

                                    <div class="col-sm-9">
                                        <input type="text"   class=" sortNumber form-control"  name="detail" id="detailid1" style="width: 250px" maxlength="3"/>
                                    </div>
                                </div>
                                      <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" >状态： </label>

                                    <div class="col-sm-9">
                                        <input type="text"   class=" sortNumber form-control"  name="state" id="stateid1" style="width: 250px" maxlength="3"/>
                                    </div>
                               
                                
                           
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default"
                                        data-dismiss="modal">关闭
                                </button>
                                <button type="button" class="btn btn-primary" onclick="updatepurchase()">提交
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
           </div>
           
            <!--
     <div id="liwd" style="display:none">
     <button   class="btn btn-primary btn-sm addBtn" >新 增</button>
      <button   class="btn btn-primary" >修改</button>
       <button   class="btn btn-danger btn-sm" id="deleteAll">删除</button> 
     </div>      
     <div id="jl" style="display:none">
       <button   class="btn btn-primary" onclick="a('1')" data-id='1'>修改</button>
	   <button  class="btn btn-danger btn-sm" data-id='1'>删 除</button>
     </div>  -->
  </div>
  </div>
  </div>
<!--   </div>   
  </div> -->   
  <div id="getPermissionDetail" style='display:none'>
  		<shiro:hasPermission name="purchase:detailButton">
			<button   class="btn btn-primary" onclick="purchase_detail(this)" >订单详情</button>
		</shiro:hasPermission>
  </div> 
	<div id="getPermissionName_a" style='display:none'>
		<shiro:hasPermission name="purchase:a">
		 <a href="#"  onclick="purchaseNameClass(this)">data_name</a> 
		</shiro:hasPermission>
	</div>
	<shiro:hasPermission name="purchase:crud" >		 
		 <div id="getPermissionUpdate" style='display:none'>
		 	<button   class="btn btn-primary" onclick="deletePurchase(data)" >删除</button>
			   &nbsp;	
			<button   class="btn btn-primary" onclick="purchase_update(data)" >修改</button>
		 </div>
	</shiro:hasPermission>
</body>
</html>
